<?php
if (isset($_POST['update'])) {
	$_data['aik_link_name'] = $_POST['aik_link_name'];
	$_data['aik_link_img'] = $_POST['aik_link_img'];
	$_data['aik_link_url'] = $_POST['aik_link_url'];
	$_data['aik_link_qq'] = $_POST['aik_link_qq'];
	if(move_uploaded_file($_FILES['aik_link_img']['tmp_name'],'../../../upload/'.$_FILES['aik_link_img']['name'])){  
	$_data['aik_link_img']='/upload/'.$_FILES['aik_link_img']['name'];}	
	$sql = 'update aikcms_link  set ' . arrtoupdate($_data) . ' where id = ' . $_GET['id'] . '';
	if (mysql_query($sql)) {
		alert_href('友情链接修改成功!', 'link.php');	
	} else {
		alert_back('修改失败!');
	}
	
}
?>